
const modulesFiles = require.context('.', true, /\.vue$/)
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
  const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
  const value = modulesFiles(modulePath)
  if (moduleName.indexOf("index") > -1) {
    modules['s' + moduleName.split('/')[0]] = value.default
  }
  return modules
}, {})


export const businessComponents = modules